<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .box {
        font-size: 12px;
        text-align: center;
        border: 1px solid #ccc;
        width:80px;
        height: 88px;
        margin: 100px auto;
        position: relative;
        color: #f40;
    }
    .box img {
        width: 60px;
        margin-top: 5px;
    }
    .close-btn {
        position: absolute;
        top: -2px;
        left: -19px;
        width: 16px;
        height: 14px;
        border: 1px solid #ccc;
        line-height: 14px;
        font-family: Arial, Helvetica, sans-serif;
        cursor: pointer;
    }
</style>
<body>
    <div class="box">
        淘宝二维码
        <img src="images/tao.png" alt="">
        <i class="close-btn">x</i>
    </div>
    <script>
        var btn = document.querySelector('.close-btn');
        var box = document.querySelector('.box');
        btn.onclick = function() {
            box.style.display = 'none';
        }
        
    </script>    
</body>
</html>